package com.todo.strategy.online.iface.request;

import com.todo.common.common.entity.CurrentUser;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

/**
 * @author azhebuxing
 * @date 2024/5/9 20:04
 * @description
 */
@Data
@Schema(title = "更新计划关联入参", description = "更新计划关联入参")
public class UpdatePlanRelationParam {

    private CurrentUser _user;

    @Schema(title = "主键Id", description = "主键Id")
    private Long id;

    @Schema(title = "计划清单id", description = "计划清单id")
    private Long planId;

    @Schema(title = "标题", description = "标题")
    private String title;

    @Schema(title = "备注", description = "备注")
    private String remark;

    @Schema(title = "关联类型", description = "关联类型")
    private Integer relationType;

    @Schema(title = "关联id", description = "关联id")
    private Long relationId;

    @Schema(title = "当天开始时间", description = "当天开始时间（HH:mm:ss）")
    private String startTime;

    @Schema(title = "关联名称", description = "关联名称")
    private String relationName;

    @Schema(title = "计划第几天", description = "计划第几天")
    private Integer planDay;

    @Schema(title = "旅游规划、建议", description = "旅游规划、建议")
    private Suggest suggest;

    @Schema(title = "时间花费", description = "时间花费")
    private Integer timeCost;

    @Schema(title = "金额花费", description = "金额花费")
    private BigDecimal moneyCost;

    @Schema(title = "自定义内容信息", description = "自定义内容信息")
    private CustomInfo customInfo;

    @Schema(title = "是否是旅游", description = "是否是旅游")
    private Boolean isTravel;


    public boolean baseCheck() {
        if (planId == null || title == null || relationType == null ||  startTime == null || planDay == null || suggest == null){
            return false;
        }
        return true;
    }

    @Data
    public static class Suggest {

        @Schema(title = "出行规划", description = "出行规划")
        private String travelPlan;

        @Schema(title = "出行备注", description = "出行备注")
        private String travelRemark;

        @Schema(title = "出行建议", description = "出行建议")
        private String travelSuggest;

        @Schema(title = "必备商品列表", description = "必备商品列表")
        private List<String> necessaryItems;
    }


    @Data
    public static class CustomInfo {
        @Schema(title = "自定义名称", description = "自定义名称")
        private String name;

        @Schema(title = "自定义类型", description = "自定义类型")
        private String customType;

        @Schema(title = "详细地址", description = "详细地址")
        private String address;

        @Schema(title = "备注", description = "备注")
        private String remark;

        @Schema(title = "经度", description = "经度")
        private BigDecimal lon;

        @Schema(title = "纬度", description = "纬度")
        private BigDecimal lat;
    }
}
